home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / CAD / PKEY11_1.ARJ / ZQ.LSP < prev   
Text File  |  1992-03-14  |  870b  |  21 lines

  1. ;A couple of handy quick zoom utilities
  2. ;
  3. ;                     ********Patrick J. McKee, author********
  4. ;                       ****Copyright 1992, Power Key tm****
  5. ;
  6. (defun c:zq()
  7. (setq vmx1 (getvar "VsMax")
  8.       vmn1 (getvar "VsMin")
  9.       fx (* (- (car vmx1) (car vmn1)) 0.0000000000001)
  10.       smll (/ (- (cadr vmx1) (cadr vmn1))
  11.           (- (fix (/ 32767 (apply 'max (getvar "screensize")))) 0.0000000000001)))
  12.   (command "zoom" "W" (mapcar '+ vmn1 (list fx fx))
  13.            (mapcar '- vmx1 (list fx fx))))
  14. (defun c:zs()
  15. (setq p1 (getpoint "\nPick center point of small window:  ")
  16.       vmx1 (getvar "VsMax")
  17.       vmn1 (getvar "VsMin")
  18.       fx (* (- (car vmx1) (car vmn1)) 0.000000000001)
  19.       smll (/ (- (cadr vmx1) (cadr vmn1))
  20.           (- (fix (/ 32767 (apply 'max (getvar "screensize")))) 0.000000000001)))
  21. (command"zoom""c" p1 smll))